#ifndef COMPASS_H
#define COMPASS_H

#include <QGLWidget>
#include <QTimer>
#include "qfitsplugin.h"

class Compass : public QGLWidget, public QFitsPlugin {
	Q_OBJECT
	Q_INTERFACES(QFitsPlugin)
	double angle;
	QTimer *timer;
public:
	Compass(QWidget *parent = 0);
	~Compass();
	void setAzimuth(double a);
	// implementation of QFitsPlugin
	void onInitialize(QObject *parent);
	QString name();
protected:
	void update();
	// implementation of GL
	void initializeGL();
	void resizeGL(int w, int h);
	void paintGL();
	// implementation of QWidget
	QSize minimumSizeHint() const;
	QSize sizeHint() const;
	int heightForWidth(int height) const;
public slots:
	void timerCallback();
};

#endif // COMPASS_H
